package test3;
/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: dell
 * Date: 2023-11-27
 * Time: 21:04
 */
class A{
    String name="add";
    int age;
    public void eat(){
        System.out.println("吃饭");
    }
}
abstract class C{
    int age;
    C(){
        System.out.println("aaaaaaa");
    }
    public  void play(){

    };
}
class B extends C{
    String name;

    B() {
        super();
        System.out.println("bbbbbbbbbbbb");
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void eat() {
        System.out.println("吃狗粮");
    }

    @Override
    public void play() {
        System.out.println("玩耍");
    }
}
public class test {
    public static void main(String[] args) {
        //A a=new A();
        B b=new B();
        // a.eat();
        b.eat();
        b.play();
        // b.setName(a.name);
        b.getName();
        System.out.println(b.name);
        System.out.println(b.age);
    }
}